/**
 * 设置页面
 * huruqing
 */

var settingView = {
    logout: function() {
        $.ajax({
            url: 'http://huruqing.cn:3000/api/user/logout',
            type: 'get',
            data: {},
            dataType: 'json',
            success: function(res) {
                if (res.code == 666) {
                    alert('退出成功');
                    location.href = './personal.html';
                } else {
                    alert(res.msg);
                }
            },
            error: function() {
                alert('请求失败');
            }
        })
    }
}